package com.persia.persistence

import org.squeryl.Schema
import com.persia.model.Temperature
import org.squeryl.adapters.MySQLAdapter
import org.squeryl.internals.StatementWriter

object Db extends Schema{
   val temperature = table[Temperature]("archive")
   
   def createTables() {
    	 val adaptor = new MySQLAdapter
    	 for (t <- tables) {
           val sw = new StatementWriter(adaptor)
           adaptor.writeCreateTable(t, sw, this)
           println(sw.statement)
         }
     }
}